import { useEffect } from 'react'
import { getColumns } from './columns'
import { DataTable } from './data-table'
import { DataDrawerForm } from './data-drawer-form'
import { Drawer } from '@renderer/components/ui/drawer'
import useModelChatStore from '@renderer/store/model-chat'

export default function ModelChat() {
  const data = useModelChatStore((status) => status.data)
  const getData = useModelChatStore((status) => status.getData)
  useEffect(() => {
    getData()
  }, [getData])
  return (
    <div className="container mx-auto py-10">
      <Drawer direction="right">
        <DataTable data={data} columns={getColumns()} />
        <DataDrawerForm />
      </Drawer>
    </div>
  )
}
